package com.qf.zhijia.service.impl;

import com.qf.zhijia.mapper.TypeMapper;
import com.qf.zhijia.pojo.Product;
import com.qf.zhijia.service.TypeService;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.stereotype.Service;

import java.util.List;

/**
 * @author Canaan
 * @version V1.0
 * @data 2020/09/05
 **/
@Service
public class TypeServiceImpl implements TypeService {

    @Autowired
    TypeMapper typeMapper;

    /**
     * 点击二级类，展示该二级类所有商品；排序展示
     * @param tId
     * @param sort
     * @return
     */
    @Override
    public List<Product> findAll(Integer tId, Integer sort) {
        List<Product> productList = typeMapper.selectProductByTypeId(tId,sort);
        return productList;
    }
}
